package com.siashan.toolkit.oss.aws;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * AWS S3 自动配置
 *
 * @author siashan
 * @date 2025-06-05
 **/
@Configuration
@EnableConfigurationProperties(AwsS3Properties.class)
public class AwsS3AutoConfiguration {

    @Bean
    @ConditionalOnMissingBean
    public AwsS3Properties awsS3Properties() {
        return new AwsS3Properties();
    }


    @Bean
    @ConditionalOnMissingBean
    public AwsS3FactoryProvider a(AwsS3Properties awsS3Properties) {
        return new AwsS3FactoryProvider(awsS3Properties);
    }
}
